package day03;

public class OperDemo4 {
    public static void main(String[] args) {
        int a = 5;
        a += 10;//相当于a=(int)(a+10)
        System.out.println(a);//15
        a *= 2;
        System.out.println(a);//30
        a /= 6;
        System.out.println(a);//5
        //小面试题
        short s = 5;
        //s = s +10;//编译错误,需强转,改为s=(short)(s+10);
        s += 10;//相当于s=(short)(s+10)

        int aa = 5;
        aa += 10;
        System.out.println(aa);
        aa *= 2;
        System.out.println(aa);
        aa /= 5;
        System.out.println(aa);

        short ss = 6;
        //s = s+10;
        s += 10;

        int aaa= 50;
        aaa += 100;
        System.out.println(aaa);
        aaa *=2;
        System.out.println(aaa);
        aaa /= 5;
        System.out.println(aaa);

        short sss= 9;
        sss +=100;
        System.out.println(sss);

    }
}
